using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools
{
    /// <summary>
    /// <para>Create Diagram</para>
    /// <para>Creates a temporary network diagram from network elements currently selected in the active map or from layers created from a Python script.</para>
    /// <para>根据当前在活动地图中选择的网络元素或从 Python 脚本创建的图层创建临时网络逻辑示意图。</para>
    /// </summary>    
    [DisplayName("Create Diagram")]
    public class CreateDiagram : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateDiagram()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network from which the diagram will be created.</para>
        /// <para>将从中创建逻辑示意图的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Template Name</para>
        /// <para>The name of the template that will be used to create the diagram.</para>
        /// <para>将用于创建关系图的模板的名称。</para>
        /// </param>
        public CreateDiagram(object _in_utility_network, object _template_name)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Create Diagram";

        public override string CallName => "nd.CreateDiagram";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _features, _out_utility_network, _out_name];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network from which the diagram will be created.</para>
        /// <para>将从中创建逻辑示意图的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Template Name</para>
        /// <para>The name of the template that will be used to create the diagram.</para>
        /// <para>将用于创建关系图的模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Template Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Features</para>
        /// <para><xdoc>
        ///   <para>One or more feature layers to be used as input for diagram generation.</para>
        ///   <para>When feature layers are specified and there are network elements selected in the active map, the selected elements set is ignored and all the features in the specified layers are used as input for diagram creation.</para>
        ///   <para>When no feature layers are specified, the process searches for the network elements selected in the active map and creates the diagram from those elements.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个或多个要素图层，用作逻辑示意图生成的输入。</para>
        ///   <para>如果指定了要素图层，并且在活动地图中选择了网络元素，则将忽略所选元素集，并将指定图层中的所有要素用作创建逻辑示意图的输入。</para>
        ///   <para>如果未指定要素图层，则该过程将搜索活动地图中选定的网络元素，并根据这些元素创建逻辑示意图。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _features { get; set; } = null;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Network Diagram Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Diagram Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_name { get; set; }


        public CreateDiagram SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}